﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RMS.Model
{
    public enum AcademicProgramType
    {
        Undergrad,
        Master
    };

    public class AcademicProgram
    {
        private int _programId;
        private string _programName;
        private string _programDescription;
        private int _semesterCount;
        private AcademicProgramType _programType;
        private List<Discipline> _disciplineList;

        public AcademicProgram(int id, string name, int semesterCount, AcademicProgramType type, string description = "...")
        {
            this._programId = id;
            this._programName = name;
            this._semesterCount = semesterCount;
            this._programType = type;
            this._programDescription = description;
            this._disciplineList = new List<Discipline>();
        }

        public override bool Equals(object obj)
        {
            AcademicProgram program = obj as AcademicProgram;
            if (program == null) return false;
            return program.Id == this.Id;
        }
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public int Id
        {
            get { return this._programId; }
            set { this._programId = value; }
        }
        public string Name
        {
            get { return this._programName; }
            set { this._programName = value; }
        }
        public string Description
        {
            get { return this._programDescription; }
            set { this._programDescription = value; }
        }
        public int SemesterCount
        {
            get { return this._semesterCount; }
            set { this._semesterCount = value; }
        }
        public AcademicProgramType Type
        {
            get { return this._programType; }
            set { this._programType = value; }
        }
        public List<Discipline> DisciplineList
        {
            get { return this._disciplineList; }
            set { this._disciplineList = value; }
        }        
    }
}
